package com.itheima.mapper;

import com.itheima.pojo.Article;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ArticleMapper {
    @Insert("INSERT INTO article(TITLE, CONTENT, COVER_IMG, STATE, CATEGORY_ID, CREATE_USER, CREATE_TIME, UPDATE_TIME) VALUES (#{title},#{content},#{coverImg},#{state},#{categoryId},#{createUser},now(),now())")
    void add(Article article);

    List<Article> list(Integer id, String categoryId, String state);

}
